<?php
$data = $_REQUEST;
if(!$data){
	exit("not found");
}
$authUrl ="https://mp.weixin.qq.com/cgi-bin/componentloginpage?component_appid={$data['component_appid']}&pre_auth_code={$data['pre_auth_code']}&redirect_uri={$data['redirect_uri']}";
?>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>获取预授权码</title>
	<style>
	   body{background-color:darkgray;}
	  .main{text-align:center;margin:20% auto;padding:0;}
	  .main>a>img{height:45px;}
	</style>
</head>
<body>
<div class="main">
<a href="<?php echo $authUrl;?>" id="authurl" style="display: inline;">
<img title="点击去授权" src="https://open.weixin.qq.com/zh_CN/htmledition/res/assets/res-design-download/icon_button3_1.png">
</a>
</div>
</body>
</html>